<!DOCTYPE html>
<html>
<head>

    <link href="__CSS__/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__CSS__/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__CSS__/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="__CSS__/animate.min.css" rel="stylesheet">
    <link href="__CSS__/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="__CSS__/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <style>

        .tr:nth-child(even){
            background-color:white ;
        }

    </style>

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRightBig">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>师傅列表</h5>
                </div>
                <div class="ibox-content col-sm-12" style="display:inline-block;margin:10px 0">
                    <form action="{:url('userlist')}" type="get">
                        <div class="input-group" style="width:200px;float:left;margin-right:9px;">
                            <span class="input-group-addon">姓名:</span>
                            <input type="text" name="real_name" value="{:input('real_name')}" class="form-control"  placeholder="姓名">
                        </div>
                        <div class="input-group" style="width:200px;float:left;margin-right:9px;">
                            <span class="input-group-addon">电话:</span>
                            <input type="text" name="phone" value="{:input('phone')}" class="form-control"  placeholder="电话">
                        </div>
                        <div class="input-group">
                            <button type="submit" class="btn btn-primary">查 询</button>
                        </div>
                    </form>
                </div>
                <div class="ibox-content">
                    <table class="table table-striped table-bordered table-hover dataTables-example dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">

                        <thead>
                        <tr role="row">
                            <th width="35px"></th>
                            <th>ID</th>
                            <th>姓名</th>
                            <th>电话</th>
                            <th>紧急联系人电话</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name="list" id="vo"}
                        <tr  class="tr">
                            <th width="35px"><input type="radio" name="user_id" value="{$vo.id}_{$vo.real_name}_{$vo.phone}" ></th>
                            <td>{$vo.id}</td>
                            <td>{$vo.real_name}</td>
                            <td>{$vo.phone}</td>
                            <td>{$vo.mobile}</td>
                        </tr>

                        {/volist}
                        </tbody>
                    </table>
                </div>
                <div class="container-fluid text-center">
                    {$list->render()}
                </div>
            </div>
        </div>
    </div>
</div>



<include file="public:footer"/>
</body>
<script type="text/javascript">
    //向父页面传值
    window.getChoseId = function () {
        var value='';
        var radio = document.getElementsByName("user_id");
        for(var i = 0;i<radio.length;i++)
        {
            if(radio[i].checked==true)
            {
                value = radio[i].value;
                break;
            }
        }
        return value;
    };
</script>
</html>